package cn.hdu.liang.io;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.EOFException;
import java.io.IOException;

public class FormattedMemoryInput {
    //汉字不能显示
    public static void main(String[] args) throws IOException {
        DataInputStream in = null;
        try {
            String read = BufferedInputFile.read(PATH.FILE_PATH + "FormattedMemoryInput.java");
            in = new DataInputStream(new ByteArrayInputStream(read.getBytes()));
            while(true) {
                System.out.print((char) in.readByte());
            }
        } catch(EOFException e) {
            System.err.println("流结束");
        }
    }
}
